//
//  FansTableViewCell.m
//  Beauty
//
//  Created by Snow on 16/9/17.
//  Copyright © 2016年 Snow. All rights reserved.
//

#import "FansTableViewCell.h"
#import "GXMacro.h"
@implementation FansTableViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        _image = [[UIImageView alloc] init];
        [self.contentView addSubview:_image];
        _labelOfName = [[UILabel alloc] init];
        [self.contentView addSubview:_labelOfName];
        _buttonOfCOntract = [UIButton buttonWithType:UIButtonTypeSystem];
        [self.contentView addSubview:_buttonOfCOntract];
    }
    return self;
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    [_image mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(self.contentView.mas_left).mas_equalTo(10);
        make.top.mas_equalTo(self.contentView.mas_top).mas_equalTo(10);
        make.bottom.mas_equalTo(self.contentView.mas_bottom).mas_equalTo(-10);
        make.width.mas_equalTo(20);
    }];
    
    [_labelOfName mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(_image.mas_right).mas_equalTo(10);
        make.top.mas_equalTo(_image.mas_top);
        make.bottom.mas_equalTo(_image.mas_bottom);
        make.right.mas_equalTo(self.contentView.mas_right).mas_equalTo(-100);
    }];
    [_buttonOfCOntract mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.mas_equalTo(self.contentView.mas_right).mas_equalTo(-10);
        make.width.mas_equalTo(80);
        make.top.mas_equalTo(_labelOfName.mas_top);
        make.bottom.mas_equalTo(_labelOfName.mas_bottom);
    }];
    [_buttonOfCOntract setTitle:@"已关注" forState:UIControlStateNormal];
    _buttonOfCOntract.tintColor = [UIColor colorWithRed:0.067 green:0.706 blue:0.616 alpha:1.000];
    _buttonOfCOntract.layer.masksToBounds = YES;
    _buttonOfCOntract.layer.cornerRadius = 5;
    _buttonOfCOntract.layer.borderWidth = 1;
    _buttonOfCOntract.layer.borderColor = [[UIColor colorWithRed:0.067 green:0.706 blue:0.616 alpha:1.000] CGColor];
}

@end
